package com.founder.bdyx.wxpro.conf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component
@PropertySource("classpath:/wx_config.properties")
@ConfigurationProperties(prefix = "wx")
public class WxConfig {

    @Value("${wx.token}")
    public String token;
    @Value("${wx.encodingAESKey}")
    public String encodingAESKey;
    @Value("${wx.appId}")
    public String appId;
    @Value("${wx.appSecret}")
    public String appSecret;
    @Value("${wx.getAccessTokenUrl}")
    public String getAccessTokenUrl;
    @Value("${wx.createButtonUrl}")
    public String createButtonUrl;
    @Value("${wx.delButtonUrl}")
    public String delButtonUrl;
    @Value("${wx.authorize1Url}")
    public String authorize1Url;
    @Value("${wx.authorize2Url}")
    public String authorize2Url;
    @Value("${wx.authorize3Url}")
    public String authorize3Url;
    @Value("${wx.authorize4Url}")
    public String authorize4Url;
    @Value("${wx.applyUrl}")
    public String applyUrl;
    @Value("${wx.applyDetailUrl}")
    public String applyDetailUrl;
    @Value("${wx.applyUrl}")
    public String appListUrl;
    @Value("${wx.secretKey}")
    public String secretKey;
    @Value("${wx.basePath}")
    public String basePath;
    @Value("${wx.prefixBasePath}")
    public String prefixBasePath;
    @Value("${wx.examRecordUrl}")
    public String examRecordUrl;
    @Value("${wx.templateUrl}")
    public String templateUrl;
    @Value("${wx.userInfoUrl}")
    public String userInfoUrl;
    @Value("${wx.template.applypass}")
    public String applyPass;
    @Value("${wx.template.sendNotice}")
    public String sendNotice;
    @Value("${wx.template.transNotice}")
    public String transNotice;

    @Override
    public String toString() {
        return "WxConfig{" +
                "appId='" + appId + '\'' +
                ", appSecret='" + appSecret + '\'' +
                ", getAccessTokenUrl='" + getAccessTokenUrl + '\'' +
                ", createButtonUrl='" + createButtonUrl + '\'' +
                ", delButtonUrl='" + delButtonUrl + '\'' +
                ", authorize1Url='" + authorize1Url + '\'' +
                ", authorize2Url='" + authorize2Url + '\'' +
                ", authorize3Url='" + authorize3Url + '\'' +
                ", authorize4Url='" + authorize4Url + '\'' +
                '}';
    }
}
